differentiate scalars with respect to vectors